import request from '@/utils/request'

export function getList(page, limit, goodsQuery) {
  return request({
    url: `/dormitory/goods/list/${page}/${limit}`,
    method: 'post',
    data: goodsQuery
  })
}

export function getGoods(id) {
  return request({
    url: `/dormitory/goods/getGoods/${id}`,
    method: 'get'
  })
}

export function remove(index) {
  return request({
    url: `/dormitory/goods/remove/${index}`,
    method: 'delete'
  })
}

export function save(goods) {
  return request({
    url: `/dormitory/goods/save`,
    method: 'post',
    data: goods
  })
}
